package com.luhuiguo.gwt.mvp.dispatcher.client;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.luhuiguo.gwt.mvp.dispatcher.server.Dispatcher;
import com.luhuiguo.gwt.mvp.dispatcher.shared.exception.ActionException;
import com.luhuiguo.gwt.mvp.dispatcher.shared.exception.ServiceException;
import com.luhuiguo.gwt.mvp.dispatcher.shared.rpc.Action;
import com.luhuiguo.gwt.mvp.dispatcher.shared.rpc.Result;

/**
 * There currently seem to be GWT compilation problems with services that use
 * generic templates in method parameters. As such, they are stripped here, but
 * added back into the {@link Dispatcher} and {@link DispatcherAsync}, which are
 * the interfaces that should be accessed by regular code.
 * <p/>
 * Once GWT can compile templatized methods correctly, this should be merged
 * into a single pair of interfaces.
 * 
 * @author LuHuiguo
 * @version $Id: StandardDispatcherService.java 11 2009-12-26 13:39:17Z luhuiguo $
 */
@RemoteServiceRelativePath(DispatcherAsync.DISPATCHER)
public interface StandardDispatcherService extends RemoteService {

    Result execute(Action<?> action) throws ActionException, ServiceException;

}
